<div id="page" class="mainPage">
    <div class="pageContent">
        <div class="header">
            <?php include 'home_header.php';?>
        </div>
        <div class="mid-content">
            <div class="left-menu">
                <?php include 'home_menu.php';?>
            </div>
            <div class="right-w-100">
                <div class="support-online">
                    <?php include 'support_online.php';?>
                    <div class="clear">&nbsp;</div>
                </div>
                <div class="top-carousel">
                    <?php include 'top-carousel.php';?>
                </div>
                <div class="slier-content">
                    <?php include 'home_slider.php';?>
                    <div class="clear">&nbsp;</div>
                </div>
            </div>
            <div class="clear">&nbsp;</div>
        </div>
        <div class="center-content">
            <div class="left-w-78">
                <div class="main-category">
                    <div class="c-parent">
                        <div class="c-parent-link">
                            <a class='active' href="<?php echo $root_page; ?>" title='Trang chủ'>Trang chủ</a>
                        </div>
                        <div class="c-parent-link"><span>»</span></div>
                            <?php foreach ($categoryParent as $key => $value) {?>
                            <?php if ($key > 0) { ?>
                                <div class="c-parent-link"><span>»</span></div>
                            <?php } ?>
                                <div class="c-parent-link" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                                    <h2>
                                        <a itemprop="url" href="/danhmuc/<?php echo $value['category_id']; ?>/<?php echo $value['category_name_filter']; ?>.html" title="<?php echo $value['category_name']; ?>">
                                            <span itemprop="title"><?php echo $value['category_name']; ?></span>
                                        </a>
                                    </h2>
                                </div>
                            <?php } ?>
                        <div class="c-parent-link"><span>»</span></div>
                        <div class="c-parent-link">
                            <h1 class="title"><?php echo $aryProductDetail['product_title']; ?></h1>
                        </div>
                        <div class="clear">&nbsp;</div>
                    </div>
                </div>
                    <div class="category_content">
                        <div class="image_detail">
                            <img class="cloudzoom" id ="zoom1" src="<?php echo $sub_domain['img'];?>/images/upload/large/<?php echo $aryProductDetail['product_large_image']; ?>" data-cloudzoom="zoomImage: '<?php echo $sub_domain['img'];?>/images/upload/large/<?php echo $aryProductDetail['product_large_image']; ?>',zoomSizeMode: 'zoom',zoomOffsetX: 15,zoomOffsetY:-50,animationTime:250,easeTime:250,easing:2" alt="<?php echo $aryProductDetail['product_title']; ?>" title="<?php echo $aryProductDetail['product_title']; ?>"/>
                        </div>
                            <?php echo $categoryContent;?>
                        <div class="clear">&nbsp;</div>
                    </div>
                    <div class="product-header">
                        Các sản phẩm liên quan
                    </div>
                    <div class="product-list">
                    <?php $i = 1;
                    foreach ($aryProduct as $key => $value) { ?>
                        <div class="item">
                            <div class="box">
                                <div class="box-item">
                                    <a href="<?php echo $root_page;?>/sanpham/<?php echo $value['product_id']; ?>/<?php echo $value['product_title_filter']; ?>.html" title="<?php echo $value['product_title']; ?>">
                                        <img src="<?php echo $sub_domain['img']; ?>/images/common/blank.gif" data-original="<?php echo $sub_domain['img'];?>/images/upload/thumbnail/<?php echo $value['product_main_image']; ?>" alt="<?php echo $value['product_title']; ?>" title="<?php echo $value['product_title']; ?>"/>
                                    </a>
                                    <div class="product-name">
                                        <a href="<?php echo $root_page;?>/sanpham/<?php echo $value['product_id']; ?>/<?php echo $value['product_title_filter']; ?>.html" title="<?php echo $value['product_title']; ?>">
                                            <?php echo $value['product_title']; ?>
                                        </a>
                                    </div>
                            </div>
                        </div>
                    </div>
                        <?php if ($i % 2 == 0) { ?>
                            <div class="clear_2"></div>
                        <?php } ?>
                        <?php if ($i % 3 == 0) { ?>
                            <div class="clear_3"></div>
                        <?php } ?>
                        <?php if ($i % 4 == 0) { ?>
                            <div class="clear">&nbsp;</div>
                        <?php } ?>
                <?php $i++; if($i == $product_limit+1) break; }  ?>
                </div>
                <div class="clear">&nbsp;</div>
            </div>
            <div class="right-w-22">
                <div class="new-product">
                    <div class="right-item">
                        <?php include 'product_right_item.php';?>
                    </div>
                        <div class="fb-fanpage">

                        </div>
                    </div>
                </div>
                <div class="clear">&nbsp;</div>
            </div>
        <div class="footer" id="footer"></div>
    </div>
</div>
<?php include 'mobile_menu.php';?>
<?php include 'scroll_menu.php'; ?>
<div class="to_top">
    <a id="go-to-top" href="javascript:;"></a>
</div>
<div id="mm-blocker"></div>
<script>
    function downloadJSAtOnload() {
    var element = document.createElement("script");
    element.src = "<?php echo $sub_domain['js'];?>/js/main/main.min.js";
    document.body.appendChild(element);
}

// Check for browser support of event handling capability
if (window.addEventListener)
    window.addEventListener("load", downloadJSAtOnload, false);
else if (window.attachEvent)
    window.attachEvent("onload", downloadJSAtOnload);
else
    window.onload = downloadJSAtOnload;
</script>